import { utils } from 'hi-ui';
export default {
    id: "BrandEntity",
    returnTotal: true,
    modelFile: "database/brand/dataset/BrandEntity.xml",//"database/brand.entity",
    sortFields: [
        "FID",
        "FDESC",
        "FPINYIN",
        "FNOTE",
        "FENTERPRISEDESC",
        "FENTERPRISEID",

    ],
    fields: {
        FID: {
            name: "FID", //字段ID
            label: "ID", //字段描述
            dbtype: "dbString", //数据类型
            default: {
                //默认值
                //rule: 'first', //prior   填充规则
                exps: (data) => {
                    //填充表达式
                    return utils.string.guid();
                },
            },
        },
        FDESC: {
            name: "FDESC", //字段ID
            label: "品牌", //字段描述
            dbtype: "dbString", //数据类型
            required: true,
            fireTarget: ["FPINYIN"],
            length: 25,
            default: {
                //默认值
                //rule: 'first', //prior   填充规则
                exps: (data) => {
                    //填充表达式
                    return utils.string.guid();
                },
            },
        },
        FPINYIN: {
            name: "FPINYIN", //字段ID
            label: "拼音", //字段描述
            dbtype: "dbString", //数据类型
            length: 50,
            default: {
                //默认值
                //rule: 'first', //prior   填充规则
                exps: (data) => {
                    //填充表达式
                    return utils.string.getPinyin(data.FDESC || "");
                },
            },

        },
        FENTERPRISEDESC: {
            name: "FENTERPRISEDESC", //字段ID
            label: "企业名称", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },
        FENTERPRISEID: {
            name: "FENTERPRISEID", //字段ID
            label: "企业ID", //字段描述
            dbtype: "dbString", //数据类型
            length: 25,
        },
        FNOTE: {
            name: "FNOTE", //字段ID
            label: "备注", //字段描述
            dbtype: "dbString", //数据类型
            length: 250,
        }

    },

    // action: "autoAction",
}
